package de.openkanban.client.util;

import java.util.List;
import java.util.Vector;

import com.smartgwt.client.types.AnimationEffect;
import com.smartgwt.client.widgets.Window;

public abstract class WindowsProvider {

	private static List<Window> openWindow = new Vector<Window>();

	public static void addWindow(Window newWindow) {
		openWindow.add(newWindow);
	}

	
	/**
	 * Destroys Windows and removes from Memory
	 */
	public static void destroyWindows() {
		for (Window window : openWindow) {
			window.animateHide(AnimationEffect.FADE, null, 500);
		}
		 openWindow = new Vector<Window>();
	}

}
